home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC & Mediji 1997 October
/
PCM_9710.iso
/
programi
/
cakewalk
/
ad.1
/
Thin Pitch Wheel.cal
< prev
next >
Wrap
Text File
|
1997-05-15
|
889b
|
40 lines
;; Thin Pitch Wheel.cal
;; A CAL program to "thin" pitch wheel data.
;;
;; Deletes every N'th pitch wheel event unless the wheel value is
;; is -8191, 0, or 8191 (min, center, and max values, respectively).
(do
(include "need20.cal") ; Require version 2.0 or higher of CAL
(int N 4) ; thin every N'th event
(int i 0) ; index for moving through
(getInt N "Delete every Nth wheel event:" 1 100 )
(forEachEvent
(if (== Event.Kind WHEEL)
(do
(switch Wheel.Val
; If -8192, 0, or 8192, don't delete
0
NIL
-8192
NIL
8191
NIL
Wheel.Val ;default
(if (== (% i N) 0) ; Is it the N'th event?
(do
(delete) ; Yes: delete it
(message "Deleted #" i) ; Let 'em know how it's going
)
)
)
(++ i) ; this counts
)
)
)
)